<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>购物车</title>
    <link rel="stylesheet" href="./css/reset.css">
    <style>
        body{
            background-color: gainsboro;
        }
        #app{
            width: 320px;
            height: 340px;
            background-color: #fff;
            padding: 0 16px;
            margin: 100px auto;
        }
        .top{
            height: 30px;
            /* background-color: red; */
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .title{
            font-weight: 700;
        }
        .iconfont{
            color: gray;
        }
        .empty{
            font-size: 14px;
            font-weight: 700;
        }
        .item{
            height: 100px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            /* background-color: yellow; */
        }
        .left{
            width: 80px;
            height: 80px;
            background-color: red;
        }
        img{
            width: 100%;
            height: 100%;
        }
        .middle{
            flex: 1;
            margin-left: 10px;
            line-height: 58px;
        }
        .name{
            font-weight: 700;
            font-size: 14px;
        }
        .price{
            color: red;
        }
        .ori_price{
            color: gray;
            font-size: 12px;
            text-decoration: line-through;
        }
        .right{
            align-self: flex-end;
            display: flex;
            margin-bottom: 10px;
        }
        .jian,.add{
            width: 20px;
            height: 20px;
            color: #00a6ff;
            border-radius: 50%;
            text-align: center;
            line-height: 20px;
            border: 1px solid #00a6ff;
        }
        .add{
            color: #fff;
            background-color: #00a6ff;
        }
        .count{
            margin: 0 10px;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="top">
            <div class="title">已选商品</div>
            <div class="clear">
                <span class="iconfont ">#</span>
                <span class="empty">清空</span>
            </div>
        </div>
        <div class="list">
            <div class="item" v-for="(item,index) in tasklist" v-bind:key="index">
                <div class="left">
                    <img v-bind:src="item.pic" alt="">
                </div>
                <div class="middle">
                    <div class="name">{{item.name}}</div>
                    <div class="price">
                        ￥{{item.price}}
                        <span class="ori_price">￥{{item.ori_price}}</span>
                    </div>
                </div>
                <div class="right">
                    <div class="jian">-</div>
                    <div class="count">{{item.count}}</div>
                    <div class="add">+</div>
                </div>
            </div>
        </div>
        <!-- <div class="bottom">

        </div> -->
    </div>
</body>
</html>
<script src="./js/vue-2.5.21.js"></script>
<script>
    let v=new Vue({
        el:'#app',
        data:{
            tasklist:[
                {id:1,pic:'./img/pic4.png',name:'秋刀鱼/斤',price:'35.00',ori_price:36,count:1},
                {id:2,pic:'./img/pic5.png',name:'鲜大带鱼/条',price:'45.00',ori_price:46,count:1},
                {id:3,pic:'./img/pic6.png',name:'鲜活全母皮皮虾/斤',price:'85.00',ori_price:86,count:1},
            ]
        }
    })
</script>